import React, { useEffect, useState } from 'react';
import useLocalStorage from '../hooks/local-store-hook';

export default function CustomLocalStorage() {
    const [name, setName] = useLocalStorage("name");

   
    return (
        <div>
            <h2>CustomLocalStorage: {name} </h2>
            <button onClick={e => setName("leon1")}>设置name</button>
        </div>
    )
}